package ie.deloitte.cvapp.dataaccess;

import java.util.List;

import ie.deloitte.cvapp.domain.Employee;
import ie.deloitte.cvapp.domain.EmployeeHasSkill;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;


@Repository("employeeHasSkillDAO")
@Transactional
public class EmployeeHasSkillDAOImp implements  EmployeeHasSkillDAO {


	@Autowired
	private SessionFactory sessionFactory;

	private Session currentSession() {
		return this.sessionFactory.getCurrentSession();
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public void save(EmployeeHasSkill e) {
		currentSession().saveOrUpdate(e);
	}
	
//	   public List<EmployeeHasSkill> getAllSkillsByEmployeeId();

}
